package com.wn.sddfp.access;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author yellow Docter
 * @date 2024-07-31
 * @desc 蜗牛创想：www.woniuxy.com
 */
@MapperScan("com.wn.sddfp.access.mapper")
@SpringBootApplication
public class BankAccessApplication {

    public static void main(String[] args) {

        SpringApplication.run(BankAccessApplication.class,args);

    }

    // 消息的转换器，支持发送消息时候传入对象，会自动把对象转换为json格式
    @Bean
    public MessageConverter messageConverter() {
        return new Jackson2JsonMessageConverter();
    }

    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

}
